<%@page import="java.util.Vector"%>
<%@page import="board.Board"%>
<%@page import="board.BoardVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
%>
<jsp:useBean id="boardVo" class="board.BoardVo"/>
<jsp:setProperty property="*" name="boardVo"/>
<%
String part = "공지사항";
boardVo.setPart(part);

Board bb = new Board();
bb.setVo(boardVo);
bb.setNowPage(boardVo.getNowPage());
Vector<BoardVo> v = bb.list();

out.print("var jsonArray = [");
for( int i=0; i<v.size(); i++){
	BoardVo vo = v.get(i);
	
	out.print("{mid: \'"    + vo.getMid()     + "\', ");
	out.print("serial: \'"  + vo.getSerial() + "\', ");
	out.print("subject: \'" + vo.getSubject() + "\', ");
	out.print("mdate: \'"   + vo.getMdate()   + "\', ");
	out.print("hit: \'"     + vo.getHit()     + "\'}");

	if(i<v.size()-1) out.print(",");
}

out.print("];");

out.print("var pageInfo={");
out.print(" totPage: \'" + bb.getTotPage() + "\', ");
out.print(" startPage: \'" + bb.getStartPage() + "\', ");
out.print(" endPage: \'" + bb.getEndPage() + "\'}");



%>

</body>
</html>